﻿@{
	Layout = "~/Views/Home/_LayOutEmpty.cshtml";
   
}
@model TesteSharepointNovo.Models.Experiencia


@Html.Partial("TopBar")


@using(Html.BeginForm("EditarExperiencia","Home",FormMethod.Post,new {@class="form-horizontal"})){

@Html.HiddenFor(c=>Model.Id)
@Html.HiddenFor(c=>Model.Curriculo.Id)
<fieldset>
<legend>Experiência</legend>



<!-- Text input-->
<div class="form-group">
  <label class="col-md-4 control-label">Mês Inicial:</label>
  <div class="col-md-4 ">
  <select id="MesInicio" name="MesInicio" class="form-control input-md">
	 @for (int i = 1; i < 13; i++)
	 {
		 var dt = new DateTime(DateTime.Now.Year, i, 1);
         var selected = i == Model.MesInicio ? "selected" : string.Empty;
			 <option @selected value="@i">@dt.ToString("MMMM")</option>
	 }

	
  </select>

		
  </div>
</div>

<div class="form-group">
  <label class="col-md-4 control-label">Ano Inicial:</label>
  <div class="col-md-4 ">
   
	<select id="AnoInicio" name="AnoInicio" class="form-control input-md">
	 @for (int i = DateTime.Now.Year; i > 1970; i--)
	 {
         var selected = i == Model.AnoInicio ? "selected" : string.Empty;
			 <option @selected value="@i">@i</option>
	 }

	
  </select>	
  </div>
</div>

<div class="form-group">
  <label class="col-md-4 control-label">Emprego Atual ?</label>
  <div class="col-md-4 ">
   @Html.EditorFor(p => p.Atual)
	
	
  </div>
</div>
<!-- Text input-->
<div class="form-group">
  <label class="col-md-4 control-label">Mês Final</label>
  <div class="col-md-4 ">
	<select id="MesFinal" name="MesFinal" class="form-control input-md">
	 @for (int i = 1; i < 13; i++)
	 {
         var selected = i == Model.MesFinal ? "selected" : string.Empty;
		 var dt = new DateTime(DateTime.Now.Year, i, 1);
			 <option @selected value="@i">@dt.ToString("MMMM")</option>
	 }

	
  </select>

	
	
  </div>
</div>

<!-- Text input-->
<div class="form-group">
  <label class="col-md-4 control-label">Ano Final</label>
  <div class="col-md-4 ">
	
	<select id="AnoFinal" name="AnoFinal" class="form-control input-md">
	 @for (int i = DateTime.Now.Year; i >1970 ; i--)
	 {
         var selected = i == Model.AnoFinal ? "selected" : string.Empty;
			 <option @selected  value="@i">@i</option>
	 }

	
  </select>	
  </div>
</div>
<!-- Text input-->
<div class="form-group">
  <label class="col-md-4 control-label">Nome da Empresa</label>
  <div class="col-md-4 ">
   @Html.TextBoxFor(p => p.NomeEmpresa, new { @class = "form-control input-md", placeholder = "(2000)" })
	
	
  </div>
</div>

<div class="form-group">
  <label class="col-md-4 control-label">Cargo</label>
  <div class="col-md-4 ">
   @Html.TextBoxFor(p => p.Cargo, new { @class = "form-control input-md", placeholder = "(2000)" })
	
	
  </div>
</div>
<!-- Textarea -->
<div class="form-group">
  <label class="col-md-4 control-label">Atividades</label>
  <div class="col-md-4 ">          
	 @Html.TextAreaFor(p => p.Atividades, new { @class = "cleditor", rows = 5 })         
	
  </div>
</div>

<div class="form-group">
    <div class="col-md-4">
        &nbsp;
    </div>
    <div class="col-md-4">
	    <button type="submit" class="btn btn-primary">Salvar</button>
	    <button type="reset" class="btn" onclick="location.href='@Url.Action("Contact")'">Cancelar</button>
    </div>
</div>
</fieldset>
}

@section Scripts {
    <script src="@Url.Content("~/Scripts/jquery-ui-1.8.20.min.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery.cleditor.min.js")"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $('.cleditor').cleditor();
        });
    </script>
}



